package util;

import java.net.DatagramPacket;
import java.net.InetAddress;
import java.net.MulticastSocket;
import java.util.Arrays;

public class SimpleReceiver {

	public static void main(String[] args) throws Exception{
	
		MulticastSocket mcs = new MulticastSocket(15003);
		mcs.joinGroup(InetAddress.getByName("225.10.1.2"));
		byte [] bb = new byte [DataPackage.len];
		DatagramPacket dp = new DatagramPacket(bb, bb.length);
		while(true){
			System.out.println("now receiving...?");
			mcs.receive(dp);
			System.out.println(Arrays.toString(bb));
		}
		
	}
}
